<!DOCTYPE html>

<html>

<head>
    <meta charset="utf-8">
    <title>卫生机构详细信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
    <style type="text/css">
        .laytable-cell-radio.layui-table-cell {
            padding: 0 5px 0 15px;
        }
        
        .laytable-cell-radio span {
            display: none;
        }
        
        .laytable-cell-radio .layui-form-radio {
            padding-right: 0;
            margin: 0;
        }
        
        .layui-tab-brief>.layui-tab-more li.layui-this::after,
        .layui-tab-brief>.layui-tab-title .layui-this::after {
            border: none;
            border-radius: 0;
            border-bottom: 2px solid #1E9FFF;
        }
        
        .layui-tab-brief>.layui-tab-title .layui-this {
            color: #1E9FFF;
        }
    </style>
</head>

<body>

    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">物业公司</li>
            <li>医院部门</li>
            <li>收集人员</li>
            <li>审核人员</li>
            <li>产废点</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <input type="text" id="no" style="display: none"></input>
                <table id="property" lay-filter="property"></table>

            </div>
            <div class="layui-tab-item">
                <table id="hospital" lay-filter="hospital"></table>
            </div>
            <div class="layui-tab-item">
                <table id="collector" lay-filter="collector"></table>
            </div>
            <div class="layui-tab-item">
                <table id="auditor" lay-filter="auditor"></table>
            </div>
            <div class="layui-tab-item">

                <table id="point" lay-filter="point"></table>
            </div>
        </div>
    </div>

    <script src="../../layuiadmin/layui/layui.js"></script>
    <script src="../../layuiadmin/layui/jquery-3.3.1.min.js"></script>
    <script>
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index'], function() {
            var id = $("#no").val();
            layui.use('table', function() {
                var table1 = layui.table;
                var table2 = layui.table;
                var table3 = layui.table;
                var table4 = layui.table;
                var table5 = layui.table;
                var $ = layui.$;

                table1.render({
                    elem: '#property',
                    height: 'full',
                    url: '../../../Customer/selectEx',
                    where: {
                        id: id
                    },
                    page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） 						
                        limit: 15,
                        limits: [10, 20, 30, 40],
                        theme: "#1E9FFF"
                    },
                    cols: [
                        [{
                            field: 'areaname',
                            title: '物业公司名称',
                            width: '30%',
                            align: 'center'
                        }, {
                            field: 'memo',
                            title: '备注',
                            width: '30%'
                        }]
                    ],
                    skin: 'row' //表格风格
                        ,
                    even: true
                });
                table2.render({
                    elem: '#hospital',
                    height: 'full',
                    url: '../../../Customer/selectArea',
                    where: {
                        id: id
                    },
                    page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） 						
                        limit: 15,
                        limits: [10, 20, 30, 40],
                        theme: "#1E9FFF"
                    },
                    cols: [
                        [{
                            field: 'areaname',
                            title: '部门名称',
                            width: '30%',
                            align: 'center'
                        }, {
                            field: 'type',
                            title: '类型',
                            width: '10%',
                            templet: function(d) {
                                if (d.type == undefined || d.type == null) {
                                    d.type = 0
                                }
                                if (d.type == 1) {
                                    return '门诊'
                                } else if (d.type == 2) {
                                    return '临床'
                                } else {
                                    return "";
                                }
                            }
                        }, {
                            field: 'point',
                            title: '已关联产废点',
                            width: '30%'
                        }, {
                            field: 'memo',
                            title: '备注',
                            width: '17%'
                        }]
                    ],
                    skin: 'row' //表格风格
                        ,
                    even: true
                });
                table5.render({
                    elem: '#point',
                    height: 'full',
                    url: '../../../Customer/selectH',
                    where: {
                        id: id
                    },
                    page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） 						
                        limit: 15,
                        limits: [10, 20, 30, 40],
                        theme: "#1E9FFF"
                    },
                    cols: [
                        [{
                            field: 'name',
                            title: '产废点名称',
                            width: '10%'
                        }, {
                            field: 'address',
                            title: '产废点地址',
                            width: '10%'
                        }, {
                            field: 'nfcname',
                            title: '智能卡',
                            width: '10%'
                        }, {
                            field: 'areadesc',
                            title: '关联部门',
                            width: '20%',
                            align: 'center'
                        }, {
                            field: 'desc',
                            title: '审核人员',
                            width: '20%'
                        }, {
                            field: 'memo',
                            title: '备注',
                            width: '10%'
                        }]
                    ],
                    skin: 'row' //表格风格
                        ,
                    even: true
                });
                table3.render({
                    elem: '#auditor',
                    height: 'full',
                    url: '../../../Customer/selectE',
                    where: {
                        id: id
                    },
                    page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） 						
                        limit: 15,
                        limits: [10, 20, 30, 40],
                        theme: "#1E9FFF"
                    },
                    cols: [
                        [{
                            field: 'areaname',
                            title: '物业公司名称',
                            width: '18%',
                            align: 'center'
                        }, {
                            field: 'nfc1',
                            title: '员工号',
                            width: '20%'
                        }, {
                            field: 'name',
                            title: '姓名',
                            width: '20%'
                        }, {
                            field: 'nfc2',
                            title: '智能卡',
                            width: '20%'
                        }, {
                            field: 'memo',
                            title: '备注',
                            width: '10%'
                        }]
                    ],
                    skin: 'row' //表格风格
                        ,
                    even: true
                });
                table4.render({
                    elem: '#collector',
                    height: 'full',
                    url: '../../../Customer/selectS',
                    where: {
                        id: id
                    },
                    page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） 						
                        limit: 15,
                        limits: [10, 20, 30, 40],
                        theme: "#1E9FFF"
                    },
                    cols: [
                        [
                            //表头

                            {
                                field: 'areaname',
                                title: '医院部门',
                                width: '18%',
                                align: 'center'
                            }, {
                                field: 'nfc1',
                                title: '员工号',
                                width: '20%'
                            }, {
                                field: 'name',
                                title: '姓名',
                                width: '20%'
                            }, {
                                field: 'nfc2',
                                title: '智能卡',
                                width: '20%'
                            }, {
                                field: 'memo',
                                title: '备注',
                                width: '10%'
                            }
                        ]
                    ],
                    skin: 'row' //表格风格
                        ,
                    even: true
                });
                $("table thead tr").css({
                    "background": "#1E9FFF",
                    "color": "white"
                });

            });
        });
    </script>
</body>

</html>